import { ApiResponse } from "apisauce"

import { apiSauce } from "@/services/api"

const MODEL_PREFIX = "/gpt404/model"

export interface BaseResp {
  code: number
}

export interface AgentModel {
  model: string
  iconUrl: string
  brief: string
  requestModalities: string[]
}

export interface GetModelsReq {}

export interface GetModelsData {
  models: AgentModel[]
}

export interface GetModelsResp extends BaseResp {
  data: GetModelsData
}

export const getModels = (params?: GetModelsReq): Promise<ApiResponse<GetModelsResp>> => {
  return apiSauce.get(`${MODEL_PREFIX}/models`, params)
}
